package com.wk.unreal.yyzxserver.controller;

import com.wk.unreal.yyzxserver.dto.Result;
import com.wk.unreal.yyzxserver.service.MenuService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/menu")
@Tag(name="MenuController", description = "菜单")
public class MenuController {
    @Autowired
    private MenuService menuService;

    @Operation(description = "获取目录接口")
    @GetMapping("/menus")
    public Result menus() {
        return menuService.menus();
    }


}
